package com.xiaozheng.service.impl;

import com.xiaozheng.dao.AccountDao;
import com.xiaozheng.domain.Account;
import com.xiaozheng.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Package: com.xiaozheng.service.impl
 * @ClassName: AccountServiceImpl
 * @Author: 小政同学    QQ:xiaozheng666888@qq.com
 * @CreateTime: 2020/9/25 12:43
 * @What_is_this_file_for: 这个文件是用来做什么的?
 * @Description: 描述
 */
@Service("accountService")
public class AccountServiceImpl implements AccountService {

    @Autowired
    private AccountDao dao;


    /**
     * 查询所有
     *
     * @return
     */
    @Override
    public List<Account> findAllAcount() {
        return dao.findAllAcount();
    }

    /**
     * 根据id查询一个
     *
     * @return
     */
    @Override
    public Account findAccountById(Integer AccountId) {
        return dao.findAccountById(AccountId);
    }

    /**
     * 保存
     *
     * @param account
     */
    @Override
    public void saveAccount(Account account) {
        dao.saveAccount(account);
    }

    /**
     * 更新
     *
     * @param account
     */
    @Override
    public void updateAccount(Account account) {
        dao.updateAccount(account);
    }

    /**
     * 根据id删除
     *
     * @param AccountId
     */
    @Override
    public void deleteAccount(Integer AccountId) {
        dao.deleteAccount(AccountId);
    }
}
